<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Extendable-output function</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Extendable-output_function"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Extendable-output_function rootpage-Extendable-output_function skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Extendable-output function</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><style data-mw-deduplicate="TemplateStyles:r1251242444">
/* start https://en.wikipedia.org/ */
.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style>
<p><b>Extendable-output function</b> (<b>XOF</b>) is an extension<sup id="cite_ref-FOOTNOTEPeyrinWang20207_1-0" class="reference"><a href="#cite_note-FOOTNOTEPeyrinWang20207-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> of the <a href="Cryptographic_hash" class="mw-redirect" title="Cryptographic hash">cryptographic hash</a> that allows its output to be arbitrarily long. In particular, the <a href="Sponge_construction" class="mw-redirect" title="Sponge construction">sponge construction</a> makes any <a href="Sponge_hash" class="mw-redirect" title="Sponge hash">sponge hash</a> a natural XOF: the squeeze operation can be repeated, and the regular hash functions with a fixed-size result are obtained from a sponge mechanism by stopping the squeezing phase after obtaining the fixed number of bits).<sup id="cite_ref-FOOTNOTEMittelbachFischlin2021526_2-0" class="reference"><a href="#cite_note-FOOTNOTEMittelbachFischlin2021526-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>
</p><p>The genesis of a XOF makes it <a href="Collision_resistance" title="Collision resistance">collision</a>, <a href="Preimage_resistance" class="mw-redirect" title="Preimage resistance">preimage</a> and <a href="Second_preimage" class="mw-redirect" title="Second preimage">second preimage</a> resistant. Technically, any XOF can be turned into a cryptographic hash by truncating the result to a fixed length (in practice, hashes and XOFs are defined differently for <a href="Domain_separation_(cryptography)" class="mw-redirect" title="Domain separation (cryptography)">domain separation</a><sup id="cite_ref-FOOTNOTEDworkin20143_3-0" class="reference"><a href="#cite_note-FOOTNOTEDworkin20143-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>). The examples of XOF include the algorithms from the <a href="Keccak" class="mw-redirect" title="Keccak">Keccak</a> family: <a href="SHAKE128" class="mw-redirect" title="SHAKE128">SHAKE128</a>, <a href="SHAKE256" class="mw-redirect" title="SHAKE256">SHAKE256</a>, and a variant with higher efficiency, <a href="KangarooTwelve" class="mw-redirect" title="KangarooTwelve">KangarooTwelve</a>.<sup id="cite_ref-FOOTNOTEPeyrinWang20207_1-1" class="reference"><a href="#cite_note-FOOTNOTEPeyrinWang20207-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p><p>XOFs are used as <a href="Key_derivation_function" title="Key derivation function">key derivation functions</a> (KDFs), <a href="Stream_cipher" title="Stream cipher">stream ciphers</a>,<sup id="cite_ref-FOOTNOTEPeyrinWang20207_1-2" class="reference"><a href="#cite_note-FOOTNOTEPeyrinWang20207-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> <a href="Mask_generation_function" title="Mask generation function">mask generation functions</a>.<sup id="cite_ref-FOOTNOTEPerlner20144_4-0" class="reference"><a href="#cite_note-FOOTNOTEPerlner20144-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Related-output_issues">Related-output issues</h2></div>
<p>By their nature, XOFs can produce related outputs (a longer result includes a shorter one as a prefix). The use of KDFs for key derivation can therefore cause related-output problems. As a "naïve" example, if the <a href="Triple_DES" title="Triple DES">Triple DES</a> keys are generated with a XOF, and there is a confusion in the implementation that causes some operations to be performed as 3TDEA (3x56 = 168-bit key), and some as 2TDEA (2x56 = 112 bit key), comparing the encryption results will lower the attack complexity to just 56 bits; similar problems can occur if hashes in the NIST SP 800-108 are naïvely replaced by the KDFs.<sup id="cite_ref-FOOTNOTEPerlner20145_5-0" class="reference"><a href="#cite_note-FOOTNOTEPerlner20145-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-FOOTNOTEPeyrinWang20207-1"><span class="mw-cite-backlink">^ <a href="#cite_ref-FOOTNOTEPeyrinWang20207_1-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-FOOTNOTEPeyrinWang20207_1-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-FOOTNOTEPeyrinWang20207_1-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><a href="#CITEREFPeyrinWang2020">Peyrin & Wang 2020</a>, p. 7.</span>
</li>
<li id="cite_note-FOOTNOTEMittelbachFischlin2021526-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEMittelbachFischlin2021526_2-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFMittelbachFischlin2021">Mittelbach & Fischlin 2021</a>, p. 526.</span>
</li>
<li id="cite_note-FOOTNOTEDworkin20143-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEDworkin20143_3-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFDworkin2014">Dworkin 2014</a>, p. 3.</span>
</li>
<li id="cite_note-FOOTNOTEPerlner20144-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEPerlner20144_4-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFPerlner2014">Perlner 2014</a>, p. 4.</span>
</li>
<li id="cite_note-FOOTNOTEPerlner20145-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEPerlner20145_5-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFPerlner2014">Perlner 2014</a>, p. 5.</span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="Sources">Sources</h2></div>
<ul><li><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFMittelbachFischlin2021" class="citation book cs1">Mittelbach, Arno; Fischlin, Marc (2021). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=Ly8WEAAAQBAJ&pg=PA526">"Extendable Output Functions (XOFs)"</a>. <i>The Theory of Hash Functions and Random Oracles: An Approach to Modern Cryptography</i>. Information Security and Cryptography. Springer International Publishing. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-3-030-63287-8</bdi><span class="reference-accessdate">. Retrieved <span class="nowrap">2023-06-22</span></span>.</cite></li>
<li><cite id="CITEREFPeyrinWang2020" class="citation book cs1">Peyrin, Thomas; Wang, Haoyang (2020). <a rel="nofollow" class="external text" href="https://eprint.iacr.org/2020/986.pdf">"The MALICIOUS Framework: Embedding Backdoors into Tweakable Block Ciphers"</a> <span class="cs1-format">(PDF)</span>. <i>Advances in Cryptology – CRYPTO 2020</i>. Lecture Notes in Computer Science. Vol. 12172. Springer International Publishing. pp. <span class="nowrap">249–</span>278. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F978-3-030-56877-1_9">10.1007/978-3-030-56877-1_9</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-3-030-56876-4</bdi>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0302-9743">0302-9743</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:221107066">221107066</a>.</cite></li>
<li><cite id="CITEREFPerlner2014" class="citation web cs1">Perlner, Ray (August 22, 2014). <a rel="nofollow" class="external text" href="https://csrc.nist.gov/events/2014/sha-3-2014-workshop">"Extendable-Output Functions (XOFs)"</a>. <i>csrc.nist.gov</i>. <a href="NIST" class="mw-redirect" title="NIST">NIST</a><span class="reference-accessdate">. Retrieved <span class="nowrap">22 June</span> 2023</span>.</cite></li>
<li><cite id="CITEREFDworkin2014" class="citation web cs1">Dworkin, Morris (August 22, 2014). <a rel="nofollow" class="external text" href="https://csrc.nist.gov/events/2014/sha-3-2014-workshop">"Domain Extensions"</a>. <i>csrc.nist.gov</i>. <a href="NIST" class="mw-redirect" title="NIST">NIST</a><span class="reference-accessdate">. Retrieved <span class="nowrap">22 June</span> 2023</span>.</cite></li></ul>
<p><br>
</p>
<style data-mw-deduplicate="TemplateStyles:r1271159938">
/* start https://en.wikipedia.org/ */
.mw-parser-output .asbox{position:relative;overflow:hidden}.mw-parser-output .asbox table{background:transparent}.mw-parser-output .asbox p{margin:0}.mw-parser-output .asbox p+p{margin-top:0.25em}.mw-parser-output .asbox-body{font-style:italic}.mw-parser-output .asbox-note{font-size:smaller}.mw-parser-output .asbox .navbar{position:absolute;top:-0.75em;right:1em;display:none}.mw-parser-output :not(p):not(.asbox)+style+.asbox,.mw-parser-output :not(p):not(.asbox)+link+.asbox{margin-top:3em}
/* end https://en.wikipedia.org/ */
</style></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-05-29" href="https://en.wikipedia.org/wiki/?title=Extendable-output_function&oldid=1292871270">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>